A distributed computing system includes two or more computing devices connected by a network. The network involves one or more network devices such as hubs, bridges, routers, and gateways connected to each other, which control the flow of information among the devices. Networks using different protocols for exchanging information can be connected to each other using internetworking devices such as gateways. The Internet is a public network of networks made possible with internetworking devices. As used herein, network devices shall mean both network and internetworking devices. Network devices may include programmable processors controlled by software stored at the device.
In typical distributed systems, processes run separately on the separate devices, and communicate with each other by sending messages. One process, the client process, initiates the communication by sending a request to another process, the server process, on another device. The message is addressed using an appropriate network protocol. The server process responds to the client's request and may issue a response message sent back to the client process using the appropriate protocol.
A primary advantage of distributed systems is that a computer resource, such as a computer controlled device, like a printer, or computer readable data, as in a database, or computer programs, as in a dynamic link library, may reside primarily at one device on the network, and still may be accessed from any other device on the network. There is sometimes a limit on concurrent users of a resource; that is, there is a limit on how many users of the network can access a particular resource at one time.
For example, providers of resources often license the resources for use in the distributed system in exchange for a fee. Many providers charge a fee that is related to the number of users of the resource. Some of these fees are expressed as a fixed fee for any number of users up to a maximum number of concurrent users, where the maximum is specified in the license.
One past approach used by network administrators to enforce compliance with the license is counting semaphores using facilities available through the operating system on the computing device providing the resource. The semaphore is a memory location shared by all the processes running in parallel on the computing device. A counting semaphore can be incremented and decremented within limiting maximum and minimum values. Whenever a client requests the resource, a server process on the computing device with the resource checks the counting semaphore. If the value stored in the counting semaphore is less than the maximum number of concurrent users, the process increments the semaphore and proceeds with using the resource. When the server process finishes its use of the resource, the server decrements the semaphore. If the value stored in the counting semaphore is not less than the maximum number of concurrent users, then, when the client requests the resource, the server process denies access to the resource.
The popularity of networks has lead to growth in the size and extent of networks. Networks are used to connect the operations of an enterprise that might be widely separated geographically, e.g., with facilities in New York, San Diego, Tokyo and Milan. Some enterprises may use the Internet to provide the wide geographical scope needed. Preferred network architecture is scalable to any size demanded to satisfy the purposes of the network. As the networks expand in size and scope, a resource available on a single machine in a distributed system may become a bottleneck. To achieve scalability, a resource may be reproduced to be available on several computing devices on the distributed system. However, when a resource subject to a maximum number of concurrent users is placed on several computing devices, there are disadvantages to using counting semaphores on each of the computing devices.
For example, if the license allows 100 users, and the resource is reproduced on four computing devices, then the 100 licenses must be spread among the four devices. The 100 licenses may be distributed as 25 licenses for each of the four devices, represented by the characters A, B, C and D. This can lead to loss of access to the resource on one of the devices when the aggregated number of users is well below the maximum allowed by the license. For example, the 26th user on device A will be denied access even if there are only ten users each on devices B, C and D. The 56th user is denied access, in effect reducing the number of allowed users to 55, well short of the 100 users that have been paid for.
One past approach used to enforce compliance with the license on a distributed system is to have a license server on one computing device called a license server host for the distributed system. All requests for the resource are directed to the one license server host. The license server uses a counting semaphore of the operating system on the license server host to determine when the maximum number of users on the distributed system is reached. If the request is not denied, then the request for the resource is forwarded to one of the distributed devices providing the resource.
A disadvantage of this approach is that the license server host becomes a bottleneck for all traffic requesting the resource. Furthermore, if the license server host breaks down or otherwise goes offline, the resource becomes unavailable to all users. This approach does not scale with the growth of the number of network devices employed to meet growth in the use of the network.
There are additional disadvantages to past approaches, whether several license servers are used or a central license server is used. For example, when a request for a resource is denied, all the user can do is try again at a later time. This requirement for repeated tries until a requested resource becomes available is wasteful, tedious and frustrating. Furthermore, the repeated requests consume network bandwidth and can slow other network traffic.
In addition, the counting semaphore, as an operating system function, is not readily extensible. This is a disadvantage when additional functionality is desired, for example to forward control to a different resource when the requested resource is unavailable.
Based on the foregoing, there is a clear need for replacing operating system counting semaphores to control concurrent access to a shared resource with a mechanism that is extensible, that consumes less bandwidth, that is less frustrating to human users, and that is scalable with distributed systems.